#include <iostream>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <unordered_set>
#include <unordered_map>
#include <functional>
#include <cmath>
#include <cstring>

using namespace std;

int main()
{

    // system("pause");
    return 0;
}

class Solution
{
public:
    bool checkEqualPartitions(vector<int> &nums, long long target)
    {
        for (auto num : nums)
        {
            if (target % num)
                return false;
        }
        int n = nums.size();
        for (int i = 1; i < (1 << n) - 1; ++i)
        {
            long long p1 = 1LL, p2 = 1LL;
            bool valid = true;
            for (int j = 0; j < n; ++j)
            {
                if ((i >> j) & 1)
                {
                    if (p1 > target / nums[j])
                    {
                        valid = false;
                        break;
                    }
                    p1 *= nums[j];
                }
                else
                {
                    if (p2 > target / nums[j])
                    {
                        valid = false;
                        break;
                    }
                    p2 *= nums[j];
                }
            }
            if (valid && p1 == target && p2 == target)
                return true;
        }
        return false;
    }
};